package com.scm.biz.action;


import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.scm.biz.query.OperateLogQuery;
import com.scm.biz.service.OperateLogService;

@Controller
@RequestMapping("/operatelog")
public class OperateLogAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7935830951665903576L;
	@Resource
	private OperateLogService operateLogService;
	
	@RequestMapping("/list")
	public ModelAndView list(String operator,String description,Integer pageNo) throws Exception {
		OperateLogQuery operateLogQuery = new OperateLogQuery();
		operateLogQuery.setPageNo(pageNo);
		operateLogQuery.setDescription(description);
		operateLogQuery.setOperator(operator);
		ModelAndView mv = new ModelAndView("system/operate_log_list");
		mv.addObject("operateLogList", operateLogService.queryPage(operateLogQuery));
		mv.addObject("splitPage", operateLogQuery.getSplitPage());
		mv.addObject("description", description);
		mv.addObject("operator", operator);
		mv.addObject("pageNo", pageNo);
		return mv;
	}

}
